package com.irdstudio.efp.batch.service.impl;

import java.net.InetAddress;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.irdstudio.basic.framework.core.constant.MonAlrmLvlEnums.MonAlrmLvlEnum;
import com.irdstudio.basic.framework.core.constant.StdZbHandleEnums.StdZbHandleEnum;
import com.irdstudio.basic.framework.core.util.DateUtility;
import com.irdstudio.basic.framework.core.util.StringUtil;
import com.irdstudio.efp.batch.service.facade.AccFileAnalysisAlrmService;
import com.irdstudio.efp.cus.service.facade.CusAccoutErroTempService;
import com.irdstudio.efp.esb.service.bo.req.hlw.ReqAlarmJudgementBean;
import com.irdstudio.efp.esb.service.bo.resp.hlw.RespAlarmJudgementBean;
import com.irdstudio.efp.esb.service.facade.hlw.AlarmJudgementService;
import com.irdstudio.efp.loan.service.facade.AccoutErroTempService;

/**
 * 
 * 
 * 1、账务文件同步文件交互告警服务<br/>
 * 
 * @author ludayong
 * @since 2019年1月25日 下午8:48:56
 * @version 1.0
 */
@Service("accFileAnalysisAlrmService")
public class AccFileAnalysisAlrmServiceImpl implements AccFileAnalysisAlrmService {

	private static Logger logger = LoggerFactory.getLogger(AccFileAnalysisAlrmServiceImpl.class);
	@Autowired
	@Qualifier("alarmJudgementService")
	private AlarmJudgementService alarmJudgementService;
	@Autowired
	@Qualifier("accoutErroTempService")
	private AccoutErroTempService loanAccoutErroTempService;// 借据中心同步文件记录异常信息
	@Autowired
	@Qualifier("cusAccoutErroTempService")
	private CusAccoutErroTempService cusAccoutErroTempService;// 客户中心同步文件记录异常信息

	/**
	 * 账务文件同步所有文件交互告警服务 <br>
	 * 1. <br>
	 * 2. <br>
	 * 3. <br>
	 * 
	 * @throws Exception
	 * @author ludayong
	 * @since 2019年1月25日 下午8:48:56
	 * @version 1.0
	 */
	public synchronized void noticeAlrmInfTotal() throws Exception {
		List<String> states = new ArrayList<String>();
		states.add(StdZbHandleEnum.PENDING.getEnname());// 未处理

		/**************** 借据中心同步文件 ******************/
		// 根据处理状态
		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.COMMON.getEnname() + "】，查询借据中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO> loanAccoutErroTempListLvl1 = loanAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.COMMON.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.COMMON.getCnname()
				+ "】查询借据中心同步文件处理错误信息，条数为：【" + loanAccoutErroTempListLvl1.size() + "】");

		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.WARNING.getEnname() + "】，查询借据中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO> loanAccoutErroTempListLvl2 = loanAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.WARNING.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.WARNING.getCnname()
				+ "】查询借据中心同步文件处理错误信息，条数为：【" + loanAccoutErroTempListLvl2.size() + "】");

		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.SERIOUS.getEnname() + "】，查询借据中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO> loanAccoutErroTempListLvl3 = loanAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.SERIOUS.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.SERIOUS.getCnname()
				+ "】查询借据中心同步文件处理错误信息，条数为：【" + loanAccoutErroTempListLvl3.size() + "】");

		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.DEADLINGESS.getEnname()
				+ "】，查询借据中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO> loanAccoutErroTempListLvl4 = loanAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.DEADLINGESS.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.DEADLINGESS.getCnname()
				+ "】查询借据中心同步文件处理错误信息，条数为：【" + loanAccoutErroTempListLvl4.size() + "】");

		List<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO> loanListAll = new ArrayList<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO>();
		int loanTotal = 0;// 错误信息数
		StringBuilder loanSbuil = new StringBuilder();
		loanSbuil.append("借据中心同步文件处理错误信息：");
		String loanMonAlrmLvl = MonAlrmLvlEnum.COMMON.getEnname();// 告警级别
		if (Objects.nonNull(loanAccoutErroTempListLvl1) && !loanAccoutErroTempListLvl1.isEmpty()) {
			loanListAll.addAll(loanAccoutErroTempListLvl1);
			loanTotal += loanAccoutErroTempListLvl1.size();
			loanSbuil.append("级别[" + MonAlrmLvlEnum.COMMON.getCnname() + "]条数为" + loanAccoutErroTempListLvl1.size() + "；");
		}
		if (Objects.nonNull(loanAccoutErroTempListLvl2) && !loanAccoutErroTempListLvl2.isEmpty()) {
			loanListAll.addAll(loanAccoutErroTempListLvl2);
			loanTotal += loanAccoutErroTempListLvl2.size();
			loanSbuil.append("级别[" + MonAlrmLvlEnum.WARNING.getCnname() + "]条数为" + loanAccoutErroTempListLvl2.size() + "；");
			loanMonAlrmLvl = MonAlrmLvlEnum.WARNING.getEnname();// 告警级别
		}
		if (Objects.nonNull(loanAccoutErroTempListLvl3) && !loanAccoutErroTempListLvl3.isEmpty()) {
			loanListAll.addAll(loanAccoutErroTempListLvl3);
			loanTotal += loanAccoutErroTempListLvl3.size();
			loanSbuil.append("级别[" + MonAlrmLvlEnum.SERIOUS.getCnname() + "]条数为" + loanAccoutErroTempListLvl3.size() + "；");
			loanMonAlrmLvl = MonAlrmLvlEnum.SERIOUS.getEnname();// 告警级别
		}
		if (Objects.nonNull(loanAccoutErroTempListLvl4) && !loanAccoutErroTempListLvl4.isEmpty()) {
			loanListAll.addAll(loanAccoutErroTempListLvl4);
			loanTotal += loanAccoutErroTempListLvl4.size();
			loanSbuil.append("级别[" + MonAlrmLvlEnum.DEADLINGESS.getCnname() + "]条数为" + loanAccoutErroTempListLvl4.size() + "；");
			loanMonAlrmLvl = MonAlrmLvlEnum.DEADLINGESS.getEnname();// 告警级别
		}

		if (loanTotal > 0) {
			String alrmInf = loanSbuil.toString();
			// 调用告警判断服务
			ReqAlarmJudgementBean loanAccFileReqBean = new ReqAlarmJudgementBean();
			loanAccFileReqBean.setMonObjNm("网贷批量");
			loanAccFileReqBean.setMonObjSpfTpVal("网贷批量");
			try {
				loanAccFileReqBean.setMonObjLctr(InetAddress.getLocalHost().getHostAddress());// 应用地址
			} catch (Exception e) {
				loanAccFileReqBean.setMonObjLctr("efp_loan");
			}
			loanAccFileReqBean.setAlrmInf(alrmInf);
			loanAccFileReqBean.setAlrmTmstmp(DateUtility.getCurrAppDateTimeString());
			loanAccFileReqBean.setMonAlrmLvl(loanMonAlrmLvl);
			RespAlarmJudgementBean loanAccFileRespBean = alarmJudgementService.alarmJudgement(loanAccFileReqBean);
			logger.info("调用告警返回码：【" + loanAccFileRespBean.getRetCd() + "】，返回信息：【" + loanAccFileRespBean.getRetMsg() + "】");

			if (Objects.nonNull(loanAccFileRespBean) && "0000".equals(loanAccFileRespBean.getRetCd())) {// 调用告警成功
				Map<String, Object> paramMap = new HashMap<String, Object>();
				paramMap.put("state", StdZbHandleEnum.HANGING.getEnname());// 处理中
				paramMap.put("list", loanListAll);// 处理中
				int num = loanAccoutErroTempService.updateStateBySernos(paramMap);// 更新已告警的信息

				logger.info("更新借据中心同步文件错误信息状态为【" + StdZbHandleEnum.HANGING.getCnname() + "】的信息数：【" + num + "】");
			}
		}
		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.WARNING.getEnname() + "】，查询借据中心同步文件处理错误信息结束！");
		/**************** 借据中心同步文件 ******************/

		/**************** 客户中心同步文件 ******************/
		// 根据处理状态
		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.COMMON.getEnname() + "】，查询客户中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO> cusAccoutErroTempListLvl1 = cusAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.COMMON.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.COMMON.getCnname()
				+ "】查询客户中心同步文件处理错误信息，条数为：【" + cusAccoutErroTempListLvl1.size() + "】");

		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.WARNING.getEnname() + "】，查询客户中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO> cusAccoutErroTempListLvl2 = cusAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.WARNING.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.WARNING.getCnname()
				+ "】查询客户中心同步文件处理错误信息，条数为：【" + cusAccoutErroTempListLvl2.size() + "】");

		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.SERIOUS.getEnname() + "】，查询客户中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO> cusAccoutErroTempListLvl3 = cusAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.SERIOUS.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.SERIOUS.getCnname()
				+ "】查询客户中心同步文件处理错误信息，条数为：【" + cusAccoutErroTempListLvl3.size() + "】");

		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getEnname() + "、" + MonAlrmLvlEnum.DEADLINGESS.getEnname()
				+ "】，查询客户中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO> cusAccoutErroTempListLvl4 = cusAccoutErroTempService
				.queryByErrorTypeStates(MonAlrmLvlEnum.DEADLINGESS.getEnname(), states);// 错误级别
		logger.info("根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.DEADLINGESS.getCnname()
				+ "】查询客户中心同步文件处理错误信息，条数为：【" + cusAccoutErroTempListLvl4.size() + "】");

		List<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO> cusListAll = new ArrayList<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO>();
		int cusTotal = 0;// 错误信息数
		StringBuilder cusSbuil = new StringBuilder();
		cusSbuil.append("客户中心同步文件处理错误信息：");
		String cusMonAlrmLvl = MonAlrmLvlEnum.COMMON.getEnname();// 告警级别
		if (Objects.nonNull(cusAccoutErroTempListLvl1) && !cusAccoutErroTempListLvl1.isEmpty()) {
			cusListAll.addAll(cusAccoutErroTempListLvl1);
			cusTotal += cusAccoutErroTempListLvl1.size();
			cusSbuil.append("级别[" + MonAlrmLvlEnum.COMMON.getCnname() + "]条数为" + cusAccoutErroTempListLvl1.size() + "；");
		}
		if (Objects.nonNull(cusAccoutErroTempListLvl2) && !cusAccoutErroTempListLvl2.isEmpty()) {
			cusListAll.addAll(cusAccoutErroTempListLvl2);
			cusTotal += cusAccoutErroTempListLvl2.size();
			cusSbuil.append("级别[" + MonAlrmLvlEnum.WARNING.getCnname() + "]条数为" + cusAccoutErroTempListLvl2.size() + "；");
			cusMonAlrmLvl = MonAlrmLvlEnum.WARNING.getEnname();// 告警级别
		}
		if (Objects.nonNull(cusAccoutErroTempListLvl3) && !cusAccoutErroTempListLvl3.isEmpty()) {
			cusListAll.addAll(cusAccoutErroTempListLvl3);
			cusTotal += cusAccoutErroTempListLvl3.size();
			cusSbuil.append("级别[" + MonAlrmLvlEnum.SERIOUS.getCnname() + "]条数为" + cusAccoutErroTempListLvl3.size() + "；");
			cusMonAlrmLvl = MonAlrmLvlEnum.SERIOUS.getEnname();// 告警级别
		}
		if (Objects.nonNull(cusAccoutErroTempListLvl4) && !cusAccoutErroTempListLvl4.isEmpty()) {
			cusListAll.addAll(cusAccoutErroTempListLvl4);
			cusTotal += cusAccoutErroTempListLvl4.size();
			cusSbuil.append("级别[" + MonAlrmLvlEnum.DEADLINGESS.getCnname() + "]条数为" + cusAccoutErroTempListLvl4.size() + "；");
			cusMonAlrmLvl = MonAlrmLvlEnum.DEADLINGESS.getEnname();// 告警级别
		}

		if (cusTotal > 0) {
			String alrmInf = cusSbuil.toString();
			// 调用告警判断服务
			ReqAlarmJudgementBean cusAccFileReqBean = new ReqAlarmJudgementBean();
			cusAccFileReqBean.setMonObjNm("网贷批量");
			cusAccFileReqBean.setMonObjSpfTpVal("网贷批量");
			try {
				cusAccFileReqBean.setMonObjLctr(InetAddress.getLocalHost().getHostAddress());// 应用地址
			} catch (Exception e) {
				cusAccFileReqBean.setMonObjLctr("efp_cus");
			}
			cusAccFileReqBean.setAlrmInf(alrmInf);
			cusAccFileReqBean.setAlrmTmstmp(DateUtility.getCurrAppDateTimeString());
			cusAccFileReqBean.setMonAlrmLvl(cusMonAlrmLvl);
			RespAlarmJudgementBean cusAccFileRespBean = alarmJudgementService.alarmJudgement(cusAccFileReqBean);
			logger.info("调用告警返回码：【" + cusAccFileRespBean.getRetCd() + "】，返回信息：【" + cusAccFileRespBean.getRetMsg() + "】");

			if (Objects.nonNull(cusAccFileRespBean) && "0000".equals(cusAccFileRespBean.getRetCd())) {// 调用告警成功
				Map<String, Object> paramMap = new HashMap<String, Object>();
				paramMap.put("state", StdZbHandleEnum.HANGING.getEnname());// 处理中
				paramMap.put("list", cusListAll);// 处理中
				int num = cusAccoutErroTempService.updateStateBySernos(paramMap);// 更新已告警的信息

				logger.info("更新客户中心同步文件错误信息状态为【" + StdZbHandleEnum.HANGING.getCnname() + "】的信息数：【" + num + "】");
			}
		}
		logger.info(
				"根据处理状态、错误类别：【" + StdZbHandleEnum.PENDING.getCnname() + "、" + MonAlrmLvlEnum.WARNING.getEnname() + "】，查询客户中心同步文件处理错误信息结束！");
		/**************** 客户中心同步文件 ******************/
	}

	/**
	 * 账务文件同步所有文件交互告警服务 <br>
	 * 1. <br>
	 * 2. <br>
	 * 3. <br>
	 * 
	 * @throws Exception
	 * @author ludayong
	 * @since 2019年1月25日 下午8:48:56
	 * @version 1.0
	 */
	@Override
	public synchronized void noticeAlrmInf() throws Exception {
		List<String> states = new ArrayList<String>();
		states.add(StdZbHandleEnum.PENDING.getEnname());// 未处理

		/**************** 借据中心同步文件 ******************/
		// 根据处理状态
		logger.info("根据处理状态：【" + StdZbHandleEnum.PENDING.getEnname() + "】，查询借据中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO> loanAccoutErroTempListLvl = loanAccoutErroTempService
				.queryByStates(states);// 处理状态
		logger.info("根据处理状态：【" + StdZbHandleEnum.PENDING.getCnname() + "】，查询借据中心同步文件处理错误信息，条数为：【" + loanAccoutErroTempListLvl.size() + "】");

		if (Objects.nonNull(loanAccoutErroTempListLvl) && !loanAccoutErroTempListLvl.isEmpty()) {
			Map<String, Object> paramMap = new HashMap<String, Object>();
			paramMap.put("state", StdZbHandleEnum.HANGING.getEnname());// 处理中
			for (com.irdstudio.efp.loan.service.vo.AccoutErroTempVO loanAccoutErroTempVO : loanAccoutErroTempListLvl) {
				// 调用告警判断服务
				ReqAlarmJudgementBean loanAccFileReqBean = new ReqAlarmJudgementBean();
				loanAccFileReqBean.setMonObjNm("网贷批量");
				loanAccFileReqBean.setMonObjSpfTpVal("网贷批量");
				try {
					loanAccFileReqBean.setMonObjLctr(InetAddress.getLocalHost().getHostAddress());// 应用地址
				} catch (Exception e) {
					loanAccFileReqBean.setMonObjLctr("efp_loan");
				}
				loanAccFileReqBean.setAlrmInf(StringUtil.isNullorBank(loanAccoutErroTempVO.getErroMsg()) ? loanAccoutErroTempVO.getRemark()
						: loanAccoutErroTempVO.getErroMsg());
				loanAccFileReqBean.setAlrmTmstmp(DateUtility.getCurrAppDateTimeString());
				loanAccFileReqBean.setMonAlrmLvl(loanAccoutErroTempVO.getErroType());
				RespAlarmJudgementBean loanAccFileRespBean = alarmJudgementService.alarmJudgement(loanAccFileReqBean);
				logger.info("调用告警返回码：【" + loanAccFileRespBean.getRetCd() + "】，返回信息：【" + loanAccFileRespBean.getRetMsg() + "】");

				if (Objects.nonNull(loanAccFileRespBean) && "0000".equals(loanAccFileRespBean.getRetCd())) {// 调用告警成功
					List<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO> loanList = new ArrayList<com.irdstudio.efp.loan.service.vo.AccoutErroTempVO>();
					loanList.add(loanAccoutErroTempVO);
					paramMap.put("list", loanList);// 处理中
					int num = loanAccoutErroTempService.updateStateBySernos(paramMap);// 更新已告警的信息

					logger.info("更新借据中心同步文件错误信息状态为【" + StdZbHandleEnum.HANGING.getCnname() + "】的信息数：【" + num + "】");
				}
			}
		}
		logger.info("根据处理状态：【" + StdZbHandleEnum.PENDING.getCnname() + "】，查询借据中心同步文件处理错误信息结束！");
		/**************** 借据中心同步文件 ******************/

		/**************** 客户中心同步文件 ******************/
		// 根据处理状态
		logger.info("根据处理状态：【" + StdZbHandleEnum.PENDING.getEnname() + "】，查询客户中心同步文件处理错误信息开始！");
		List<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO> cusAccoutErroTempListLvl = cusAccoutErroTempService.queryByStates(states);// 错误级别
		logger.info("根据处理状态：【" + StdZbHandleEnum.PENDING.getCnname() + "】，查询客户中心同步文件处理错误信息，条数为：【" + cusAccoutErroTempListLvl.size() + "】");

		if (Objects.nonNull(cusAccoutErroTempListLvl) && !cusAccoutErroTempListLvl.isEmpty()) {
			Map<String, Object> paramMap = new HashMap<String, Object>();
			paramMap.put("state", StdZbHandleEnum.HANGING.getEnname());// 处理中
			for (com.irdstudio.efp.cus.service.vo.AccoutErroTempVO cusAccoutErroTempVO : cusAccoutErroTempListLvl) {
				// 调用告警判断服务
				ReqAlarmJudgementBean cusAccFileReqBean = new ReqAlarmJudgementBean();
				cusAccFileReqBean.setMonObjNm("网贷批量");
				cusAccFileReqBean.setMonObjSpfTpVal("网贷批量");
				try {
					cusAccFileReqBean.setMonObjLctr(InetAddress.getLocalHost().getHostAddress());// 应用地址
				} catch (Exception e) {
					cusAccFileReqBean.setMonObjLctr("efp_cus");
				}
				cusAccFileReqBean.setAlrmInf(StringUtil.isNullorBank(cusAccoutErroTempVO.getErroMsg()) ? cusAccoutErroTempVO.getRemark()
						: cusAccoutErroTempVO.getErroMsg());
				cusAccFileReqBean.setAlrmTmstmp(DateUtility.getCurrAppDateTimeString());
				cusAccFileReqBean.setMonAlrmLvl(cusAccoutErroTempVO.getErroType());
				RespAlarmJudgementBean cusAccFileRespBean = alarmJudgementService.alarmJudgement(cusAccFileReqBean);
				logger.info("调用告警返回码：【" + cusAccFileRespBean.getRetCd() + "】，返回信息：【" + cusAccFileRespBean.getRetMsg() + "】");

				if (Objects.nonNull(cusAccFileRespBean) && "0000".equals(cusAccFileRespBean.getRetCd())) {// 调用告警成功
					List<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO> cusList = new ArrayList<com.irdstudio.efp.cus.service.vo.AccoutErroTempVO>();
					cusList.add(cusAccoutErroTempVO);

					paramMap.put("list", cusList);// 处理中
					int num = cusAccoutErroTempService.updateStateBySernos(paramMap);// 更新已告警的信息

					logger.info("更新客户中心同步文件错误信息状态为【" + StdZbHandleEnum.HANGING.getCnname() + "】的信息数：【" + num + "】");
				}
			}
		}
		logger.info("根据处理状态：【" + StdZbHandleEnum.PENDING.getCnname() + "】，查询客户中心同步文件处理错误信息结束！");
		/**************** 客户中心同步文件 ******************/
	}
}
